// bigfile
package main

import (
	"os"
	"path/filepath"
	//"strconv"
	"fmt"
)

type BigFileIndex struct {
	FileNo string
	Offset int64
	Length int64
}

type BigFile struct {
	UnitFileByte int64
	FileDir      string
	lastFileNo   string
}

func (this *BigFile) Init() {
	this.GetLastFileNo()
}

//func (this *BigFile) Append(buf []byte) (*BigFileIndex, error) {

//}

func (this *BigFile) GetLastFileNo() string {
	if this.lastFileNo == "" {
		filepath.Walk(this.FileDir, this.walkFunc())
	}
	return this.lastFileNo
}

func (this *BigFile) walkFunc() func(string, os.FileInfo, error) error {
	return func(path string, info os.FileInfo, err error) error {
		name := info.Name()
		fmt.Println(name)
		return nil
	}

}
